
package com.insigma.business.qrcode.soldier.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.GovEmployeeDao;
import com.insigma.business.qrcode.soldier.dto.GovEmployeeBSearcher;
import com.insigma.business.qrcode.soldier.dto.GovEmployeeIdDTO;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.entity.GovEmployeeDO;
import com.insigma.business.qrcode.soldier.entity.GovEmployeeWithJobDO;
import com.insigma.business.qrcode.soldier.service.GovEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("govEmployeeService")
public class GovEmployeeServiceImpl implements GovEmployeeService {

    @Autowired(required = false)
    private GovEmployeeDao govEmployeeDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<GovEmployeeDO> search(final GovEmployeeBSearcher govEmployeeBSearcher) {
        return govEmployeeDao.search(govEmployeeBSearcher);
    }
   
    @Override
    public GovEmployeeDO get(final String id){
        return govEmployeeDao.get(id);
    }

    
    @Override
    public Integer insert(final GovEmployeeDO govEmployeeDO){
        govEmployeeDO.setId(sequenceGenerator.genKey(SequenceNameConstant.GOV_EMPLOYEE_ID));
        return govEmployeeDao.insert(govEmployeeDO);
    }

    
    @Override
    public Integer update(final GovEmployeeDO govEmployeeDO){
        return govEmployeeDao.update(govEmployeeDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return govEmployeeDao.delete(id,modifierType,modifierId);
    }

    
    @Override
    public GovEmployeeDO getByMobile(final String mobile) {
        return govEmployeeDao.getByMobile(mobile);
    }

    @Override
    public GovEmployeeIdDTO getGovEmpIdByMobile(String mobile) {
        return govEmployeeDao.getGovEmpIdByMobile(mobile);
    }

    @Override
    public List<GovEmployeeWithJobDO> searchEmpolyeeOfGov(GovEmployeeBSearcher govEmployeeBSearcher) {
        return govEmployeeDao.searchEmpolyeeOfGov(govEmployeeBSearcher);
    }

    @Override
    public List<GovEmployeeDO> searchSubGovEmployee(GovEmployeeBSearcher govEmployeeBSearcher) {
        return govEmployeeDao.searchSubGovEmployee(govEmployeeBSearcher);
    }

    @Override
    public List<GovEmployeeDO> searchSubGovEmployeeByType(GovEmployeeBSearcher govEmployeeBSearcher) {
        return govEmployeeDao.searchSubGovEmployeeByType(govEmployeeBSearcher);
    }

    @Override
    public GovEmployeeDO getByOutAccountId(String outerAccountId) {
        return govEmployeeDao.getByOutAccountId(outerAccountId);
    }

    @Override
    public List<GovEmployeeWithJobDO> searchZzdEmpolyeeOfGov(GovEmployeeBSearcher govEmployeeBSearcher) {
        return govEmployeeDao.searchZzdEmpolyeeOfGov(govEmployeeBSearcher);
    }

    @Override
    public GovEmployeeDO getByEmployeeZzdAccountId(String outerAccountId) {
        return govEmployeeDao.getByEmployeeZzdAccountId(outerAccountId);
    }

}
